package com.example.dqreptile.service.impl;

import com.example.dqreptile.dao.ICharactRepository;
import com.example.dqreptile.dao.ISkillRepository;
import com.example.dqreptile.entity.Charact;
import com.example.dqreptile.service.ICharactService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ICharactSaveImpl implements ICharactService {


    @Autowired
    private ICharactRepository iCharactRepository;


    @Override
    public Charact saveCharact(Charact charact) {
        return this.iCharactRepository.save(charact);
    }

    @Override
    public Charact findOne(int cId) {
        return this.iCharactRepository.findById(cId).orElse(null);
    }
}
